package Mangos::DB::Mangos::Gameobject;

use strict;

use base qw(Mangos::DB::Mangos);

__PACKAGE__->meta->setup
(
    table   => 'gameobject',

    columns => 
    [
        guid          => { type => 'integer', not_null => 1 },
        id            => { type => 'integer', default => '0', not_null => 1 },
        map           => { type => 'integer', default => '0', not_null => 1 },
        spawnMask     => { type => 'integer', default => 1, not_null => 1 },
        phaseMask     => { type => 'integer', default => 1, not_null => 1 },
        position_x    => { type => 'float', default => '0', not_null => 1, precision => 32 },
        position_y    => { type => 'float', default => '0', not_null => 1, precision => 32 },
        position_z    => { type => 'float', default => '0', not_null => 1, precision => 32 },
        orientation   => { type => 'float', default => '0', not_null => 1, precision => 32 },
        rotation0     => { type => 'float', default => '0', not_null => 1, precision => 32 },
        rotation1     => { type => 'float', default => '0', not_null => 1, precision => 32 },
        rotation2     => { type => 'float', default => '0', not_null => 1, precision => 32 },
        rotation3     => { type => 'float', default => '0', not_null => 1, precision => 32 },
        spawntimesecs => { type => 'integer', default => '0', not_null => 1 },
        animprogress  => { type => 'integer', default => '0', not_null => 1 },
        state         => { type => 'integer', default => '0', not_null => 1 },
    ],

    primary_key_columns => [ 'guid' ],
);

1;

package Mangos::DB::Mangos::Gameobject::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Mangos::Gameobject' }

__PACKAGE__->make_manager_methods('gameobject');

1;
